//
//  BHCompetitionApplyGroupItemModel.swift
//  BigHealth
//
//  Created by 蔺百好 on 2021/6/16.
//

import UIKit

class BHCompetitionApplyGroupItemModel {
   
    var chose: Bool = false    
    
    
    // 接口数据
    var groupId: String = ""
    var name: String = ""
    var limitTeam: Int = 0 // 每组限制队伍个数（团体赛）；个人赛限制人数
    var limitPerson: Int = 0 // 最大报名人数（团队赛）
    var limitMinPerson: Int = 0 // 最小报名人数（团队赛）
    var leftNumber: Int = 0 // 剩余报名人数
    var totalNumber: Int = 0 // 团体赛最大人数
    
    
    func parseDic(_ dic: [String:Any])  {
        self.groupId = BHJsonTool.decodeStringFromDic(dic: dic, key: "id")
        self.name = BHJsonTool.decodeStringFromDic(dic: dic, key: "name")
    
        
        self.limitTeam = BHJsonTool.decodeIntFromDic(dic: dic, key: "limitTeam")
        self.limitPerson = BHJsonTool.decodeIntFromDic(dic: dic, key: "limitPerson")
        self.limitMinPerson = BHJsonTool.decodeIntFromDic(dic: dic, key: "limitMinPerson")
        self.leftNumber = BHJsonTool.decodeIntFromDic(dic: dic, key: "leftNumber")
        self.totalNumber = BHJsonTool.decodeIntFromDic(dic: dic, key: "totalNumber")

    }
}
